package com.linln.admin.app.domain;

import com.linln.common.utils.StatusUtil;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.Where;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @author 陶富成
 * @date 2021/07/09
 */
@Data
@Entity
@Table(name = "app_version")
@EntityListeners(AuditingEntityListener.class)
@Where(clause = StatusUtil.NOT_DELETE)
@DynamicInsert
@DynamicUpdate
public class AppVersion implements Serializable {
    // 主键
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    // 版本名称
    private String version;
    // 开发负责人
    private Long leader_id;
    // 项目开始时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date start_time;
    // 需求概述
    private String demand_title;
    // 需求URL
    private String demand_url;
    //是否是紧急修复版本
    private String hotfix_flag;
    // 是否已经创建release发布分支
    private String co_release_branch;
    // 发布状态
    private String published;
    // 发布时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date publishtime;
    // 状态
    private Byte status;
    //是否已经发布到生产环境
    private String onprod;
}